import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/campushoy/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/campushoy/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/campushoy/logout',
    method: 'get'
  })
}

export function editPosition(data) {
  return request({
    url: '/campushoy/position',
    method: 'post',
    data
  })
}

export function sign() {
  return request({
    url: '/campushoy/sign',
    method: 'get'
  })
}

export function signByAssignWind(data) {
  return request({
    url: '/campushoy/signByAssignWind',
    method: 'post',
    data
  })
}

export function autoSign(data) {
  return request({
    url: '/campushoy/autoSign',
    method: 'post',
    data
  })
}

//获取单日任务
export function getStuSignInfosInOneDay(data) {
  return request({
    url: '/campushoy/getStuSignInfosInOneDay',
    method: 'post',
    data
  })
}

export function detailSignInstance(data) {
  return request({
    url: '/campushoy/detailSignInstance',
    method: 'post',
    data
  })
}

export function addQuestionAnswer(data) {
  return request({
    url: '/campushoy/addQuestionAnswer',
    method: 'post',
    data
  })
}

export function myQuestionInfo() {
  return request({
    url: '/campushoy/myQuestionInfo',
    method: 'get',
  })
}
